﻿Module modGIS
    Public Sub Main()
        ShowGIS()
        'ShowGMap()
    End Sub

    Public Sub ShowGIS()
        System.Windows.Forms.Application.EnableVisualStyles()
        With New WRDB.GIS.frmGIS(WRDB.GIS.frmGIS.enumMode.Animate)
            If My.Application.CommandLineArgs.Count = 0 Then
                .ShowDialog()
            Else
                Dim cmdLine As String = My.Application.CommandLineArgs(0).Replace("""", "")
                If cmdLine.ToUpper.Replace("/", "-") = "-L" Then
                    .LoadLast = True
                    .ShowDialog()
                ElseIf My.Computer.FileSystem.FileExists(cmdLine.Replace("""", "")) Then
                    .LoadFile = cmdLine.Replace("""", "")
                    .ShowDialog()
                Else
                    MessageBox.Show("WRDBGIS usage:\n\t-L or /L\t= load last map\n\tFilename\t= load specified .gis file on startup (enclose in quotes if path contains spaces)".Replace("\n", vbCr).Replace("\t", vbTab), "WRDBGIS", MessageBoxButtons.OK, MessageBoxIcon.Error)
                End If
            End If
            .Dispose()
        End With
    End Sub

    Public Sub ShowGMap()
        With New WRDB.GIS.frmGMap(Nothing)
            .ShowDialog()
        End With
    End Sub
End Module
